import { get,post } from '../../utils/request'
const state = {
  orders:[],
  total:0
}
const actions = {
	findAllOrders(context,list){
    get('/order/pageQuery',list).then(res =>{
      // console.log(res.data);
      context.commit('SET_ORDERS',res.data.list)
      context.commit('SET_TOTAL',res.data.total)
    })
  }
}
const mutations = {
	SET_ORDERS(state,list){
    state.orders = list
  },
  SET_TOTAL(state,list){
    state.total = list
  }
}
export default {
	namespaced: true,
	state,
	actions,
	mutations
}